import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooSmsLogController } from '../../../controllers';
const uctoosmsLogRouter = new Router();
const smsLogController = new uctooSmsLogController();

uctoosmsLogRouter.post('/add', requireUser, smsLogController.add);
uctoosmsLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/sms_log'), smsLogController.edit);
uctoosmsLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/sms_log'), smsLogController.delete);

//For getting smsLog with permission control
uctoosmsLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/sms_log'), smsLogController.getSingle);
uctoosmsLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/sms_log'), smsLogController.getMany);
uctoosmsLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/sms_log'), smsLogController.getMany);

//#endregion AutoCreateCode
export default uctoosmsLogRouter;
